<?php
/*************************************************************************************
 *
 *	FileName: tpl_crop_avatar.php
 *	Desc    : crop the avatar
 *	Author  : Seal
 *	Date    : 2010-8-8
 *
 *************************************************************************************/
?>
  <div class="right_bar">
  
  	<?php
	if( $errmsg->size('crop_avatar') > 0 ) $errmsg->output('crop_avatar');
	?>
	  
<div class="orange_box">
	     <div class="orange_middle">
	         <div class="orange_title">
	          <h1>裁剪头像</h1>
	          </div>                       
	   	 </div>
                    
		<div class="basicInfo_box">
				<div class="basicInfo_item">			
			<form method="post"  enctype="multipart/form-data" action="<?php echo edp_href_link( PAGENAME_USER_SETTING, 'subpage=crop_avatar')?>">
				<input type="hidden" name="action" value="crop_avatar"/>
				<input type="hidden" name="id" value="<?php echoPageVar($pageVars, "id")?>"/>
				<font color="red">用鼠标在图片上拖动区域，生成小头像：</font><br /><br />
					<img id="ori_pic" src="<?php echo $pageVars['avatarPath']?>" alt="<?php echoPageVar($pageVars, "nick");?>" />
				
				<br/>
				头像预览：
				<div style="position:relative;">
				<span id="preview_box" style="width:80px;height:80px;overflow:hidden; position: absolute; top:0;" >
					<img id="crop_preview" src="<?php echo $pageVars['avatarPath']?>" />
				</span>
				</div>
				<br /><br /><br /><br /><br /><br />
				<input type="submit" value="裁剪" />
				<input type="hidden" name="x1" id="x1" />
				<input type="hidden" name="y1" id="y1" />
				<input type="hidden" name="x2" id="x2" />
				<input type="hidden" name="y2" id="y2" />
				<input type="hidden" name="w" id="w" />
				<input type="hidden" name="h" id="h" />
			</form>
			</div>
	     </div>                         
                  
	</div>
	
</div>